<!--_meta 管理员显示病人列表-->
<!DOCTYPE HTML>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="Bookmark" href="favicon.ico" >
    <link rel="Shortcut Icon" href="favicon.ico" />
    <!--[if lt IE 9]>
    <script type="text/javascript" src="lib/html5.js"></script>
    <script type="text/javascript" src="lib/respond.min.js"></script>
    <![endif]-->
    <link rel="stylesheet" type="text/css" href="/h-ui/css/H-ui.min.css" />
    <link rel="stylesheet" type="text/css" href="/h-ui.admin/css/H-ui.admin.css" />
    <link rel="stylesheet" type="text/css" href="lib/Hui-iconfont/1.0.8/iconfont.css" />
    <link rel="stylesheet" type="text/css" href="/h-ui.admin/skin/default/skin.css" id="skin" />
    <link rel="stylesheet" type="text/css" href="/h-ui.admin/css/style.css" />
    <!--[if IE 6]>
    <script type="text/javascript" src="http://lib.h-ui.net/DD_belatedPNG_0.0.8a-min.js" ></script>
    <script>DD_belatedPNG.fix('*');</script><![endif]-->
    <!--/meta 作为公共模版分离出去-->

    <title>baby堂小儿推拿医疗管理系统</title>
    <meta name="keywords" >
    <meta name="description" >
</head>
<body>
<!--_header 作为公共模版分离出去-->
<div th:replace="head :: head"></div>
<!--/_header 作为公共模版分离出去-->

<!--_menu 作为公共模版分离出去-->
<div th:replace="menu :: menu"></div>
<!--/_menu 作为公共模版分离出去-->

<section class="Hui-article-box">
    <nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 预约管理<a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);"  th:href="@{/ListRegistration}" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
    <div class="Hui-article">
        <article class="cl pd-20">
            <div class="text-c">
                <form th:action="@{/ListRegistration}" th:method="POST">
                    <input type="text" class="input-text" style="width:250px" placeholder="输入姓名或电话" id="" name="docInof">
                    <button type="submit" class="btn btn-success radius" id="" name=""><i class="Hui-iconfont">&#xe665;</i> 搜预约</button>
                </form>
            </div>
            <div class="mt-20">
                <table class="table table-border table-bordered table-hover table-bg table-sort">
                    <thead>
                    <tr class="text-c">
                        <th width="80">ID</th>
                        <th width="100">姓名</th>
                        <th width="40">电话</th>
                        <th width="90">套餐</th>
                        <th width="150">预约医生</th>
                        <th width="110">时间</th>
                        <th width="150">操作</th>

                    </tr>
                    </thead>
                    <tbody>
                    <tr class="text-c" th:each="r:${rts}">
                        <td th:text="${rts.indexOf(r) + 1}" >1</td>
                        <td><u th:text="${r.pai_name}">张三</u></td>
                        <td th:text="${r.pai_phone}">电话号码</td>
                        <td th:switch="${r.pai_meal}">
                            <a th:case="1">健脾胃</a>
                            <a th:case="2">增强免疫力</a>
                            <a th:case="3">活动筋骨</a>
                        </td>
                        <td >
                            <a th:text="${r.dname}">医生姓名 </a>
                        </td>
                        <td class="td-manage" th:text="${r.time}"></td>
                        <td class="td-status">
                            <a class="label label-danger radius"  th:onclick="deleteRegistration([[${r.id}]]);" >删除</a>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>
            </br>
            </br>
            <div id="page" class="page_div">
                <a th:href="@{/ListRegistration(currentPage=1)}" class="btn btn-success">首页</a>
                <a th:href="@{/ListRegistration(currentPage=${currentPage-1})}" id="prevpage">上一页</a>
                <span>
                    <span th:text="${currentPage}"></span>
                    <span >/</span>
                    <span th:text="${pages}"></span>
                </span>
                <a th:href="@{/ListRegistration(currentPage=${currentPage+1})}" id="nextpage">下一页</a>
                <a th:href="@{/ListRegistration(currentPage=${pages })} "id="lastpage" class="btn btn-success">末页</a>
            </div>
        </article>
    </div>
</section>

<!--_footer 作为公共模版分离出去-->
<script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="lib/layer/2.4/layer.js"></script>
<script type="text/javascript" src="/h-ui/js/H-ui.js"></script>
<script type="text/javascript" src="/h-ui.admin/js/H-ui.admin.page.js"></script>
<!--/_footer /作为公共模版分离出去-->

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="lib/My97DatePicker/4.8/WdatePicker.js"></script>
<script type="text/javascript" src="lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="lib/laypage/1.2/laypage.js"></script>
<script type="text/javascript">

    /*删除挂号信息*/
    function deleteRegistration(id){
        $.ajax({
            type: 'POST',
            url: '/deleteRegistration',
            dataType: 'json',
            data:{id:id},
            success: function(data){
                if(data.status==200){
                    layer.msg('已删除!',{icon:1,time:1000});
                    window.setTimeout("window.location='/ListRegistration'",1000);
                }
            },
            error:function(data) {
                layer.msg('删除失败!');
            },
        });
    }





</script>
<!--/请在上方写此页面业务相关的脚本-->
</body>
</html>